- 
                Notifications
    You must be signed in to change notification settings 
- Fork 146
[DNM] Gree Integration rewrite #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Change config flow to: be multi step and allow setting the device features; allow to reconfigure an entry - Separate HA and Device API logic: device API is now declarative and handles device behaviour. HA entities expose the device - Implement a coordinator - Async device communication - More error handling
- Move consts around - Proper error report on config_flow - Proper translations on config_flow - Configuration of timeout - Fetch device info during binding
| @RobHofmann I was adding the temperature step back, but I'm not sure of its utility. | 
| @p-monteiro | 
| Hi @domialex, that's fine. I'm more interested in the real use case for it. Should it be locked to integers? I don't think any device supports half degrees or even 0.1 steps, as is the lower limit for the current slider... | 
Unfortunately we can't use the EntitySelector as it doesn't allow for unsetting a previously set value
| I pushed the domain change, beware! | 
| 
 
 | 
| 
 @RobHofmann Ah ok, I'll add it back. Would a bool for "Supports half increments" be better? | 
| 
 I would leave the steps option. people can then choose how to do this (even 0.1's are theoretically possible). | 
| @RobHofmann I re-added the temperature step, but I limited it to 0.5 increments as the API only supports half ºC and integer ºF. A warning is logged if a non-integer ºF is set, since it is rounded to the nearest integer. | 
| 
 Sorry it took me a while, quite busy lately. here is the log: Please let me know if you have an idea where the issue is, or need me to debug further. | 
| @meirlo Thanks for your patience with us. | 
| BTW, I see that this integration does not override the official integration anymore and also the Gree logo is missing. | 
| 
 That is intended. Once we go through with this PR, we can PR the logo on the official custom integration brands. About the error, as predicted, the device was added, but now it is failing to get the status, which is weird since the log shows that it receives the status correctly, and there is no exception logged. I'll check later. Update: Actually, I see that some important fields are blank. Do you happen to know if some of the properties are given by the main device while others are given by the subdevices? That can explain the problem. Also, can you provide screenshots of how the official app organizes the settings for the VRF? | 
Fixes changing the device name breaking previous entities
This is useful for when a device changes IP
| @meirlo Thanks for the screenshots, I'm having a bit of a hard time understanding the options, not gonna lie. More importantly, how would you expect the controls to work in Home Assistant in terms of devices and the controls they provide? | 
| @p-monteiro does it looks different on your ac? In home assistant, I believe each unit needs to be a separate device, with its own settings. similar to how it shows in the gree+ app. The limitation of the mode that must be set on the main unit first,  can be ignored. if one want to sync between the mode in all ac it can be done via automation, no need to over complicate the integration. | 
| @meirlo The thing is, at first glance, the subdevices API does not provide some of the parameters that you want (they came empty in the status pack, but it needs to be further investigated), so maybe the official app sends commands to both the subunit and the main unit when you change the mode on the subunit. If that's the case, it can actually be easier to make the subunits override the main one, or just omit the properties altogether. I just pushed a commit, please try it, and check if the main device can be discovered, added and it works. Ignore the subunits for a moment hehe | 
| This might need some architectural changes in the way we communicate with the device (possibly to communicate with the main and sub devices for getting and setting the status) | 
| @meirlo Another thing, in a VRF system all units are the same as the main one right? So the capabilities of them all are the same. | 
| I'm getting an error when trying to add the entity without the sub unit For the second question, the indoor units are not always identical. For example, my living room ac is a different one than the rest. Can you please elaborate which parameters are missing? | 
| @meirlo I'm having a hard time debugging the issue, sorry. Please try the latest version and provide the full debug log, not only the exception. | 






[DO NOT MERGE]
⚠️ATTENTION ⚠
This PR changes the domain of the integration, so current users will lose their device configs!
The config schema also changed, so verify your YAML if you use it to configure the devices.
This PR introduces a rewrite of this integration. The main goal of this was to better align the integration with the Home Assistant (HA) development workflow with two main changes:
Other changes that are present in this PR:
I want full feature parity with the current integration and iron out some bugs before this is ready to merge (if you so wish). Currently missing and wishlist:
As you can see, there are a lot of changes, and I understand if this does not go through as is.
I am creating the PR mainly to gather feedback and track progress since most features are now present in this PR.
Don't treat this PR as blocking. I am tracking new changes and integrating them as they are committed.
Also, since this is a big rewrite, I wonder if we should use it to bump the major version (4?) and possibly change the domain to not replace the official integration (as I saw in the bug reports that it might impose some problems).